package com.tanhua.server.service;

import com.tanhua.dubbo.api.mongo.BaiduApi;
import com.tanhua.server.interceptor.UserHolder;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Service;

import java.util.Map;

@Service
public class BaiduService {

    @DubboReference
    private BaiduApi baiduApi;


    public void sendLocation(Map<String, Object> params) {
        Double Y = (Double) params.get("latitude");
        Double X = (Double) params.get("longitude");
        String addrStr = (String) params.get("addrStr");
        baiduApi.sendLocation(UserHolder.getUserId(),X,Y,addrStr);
    }
}
